<template>
	
	<view class="content">
<<<<<<< HEAD
		
		<image class="headicon" :src="userInfo.usericon" mode=""></image>
		<view class="text">
			<text>{{userInfo.username}}</text>
		</view>
		<view class="entry-wrapper">
			<!-- <text>订单列表</text>
			<text>修改密码</text>
			<text>意见反馈</text> -->
			<view class="item">
				<text>个人信息</text>
				<image src="../../static/more.png" mode=""></image>
			</view>
			
			<view class="item">
				<text>订单列表</text>
				<image src="../../static/more.png" mode=""></image>
			</view>
			
			<view class="item">
				<text>修改密码</text>
				<image src="../../static/more.png" mode=""></image>
			</view>
			
			<view class="item">
				<text>意见反馈</text>
				<image src="../../static/more.png" mode=""></image>
			</view>
		</view>
		<button type="primary">退出</button>
	
=======
		<view class="title">
			<image :src="usericon" mode="" v-if="userInfo"></image>
			<image src="../../static/mp.png" mode="" v-else></image>
			<text v-if="userInfo">{{userInfo.name }}</text>
			<text v-else>用户未登录</text>
		</view>
		<view class="father">
			<image class="headicon" :src="userinfo.headicon" mode=""></image>
			<text class="title">{{userinfo.username}}</text>
		</view>
		<view class="entry-wrap">
			<view class="entry">
				<image class="entry1" src="../../static/mp.png" mode=""></image>
				个人信息
			</view>
			<view class="entry">
				<image class="entry1" src="../../static/dd.png" mode=""></image>
				订单列表
			</view>
			<view class="entry">
				<image class="entry1" src="../../static/suo.png" mode=""></image>
				修改密码
			</view>
			<view class="entry">
				<image class="entry1" src="../../static/fk.png" mode=""></image>
				意见反馈
			</view>
		</view>
		<button type="primary" @click="quit" v-if="userInfo">退出</button>
		<button type="primary" @click="quit" v-else>去登录</button>
>>>>>>> d747fee (作业13)
	</view>

</template>

<script>
	export default {
<<<<<<< HEAD
		data(){
			return{
				title:'食物App是一个用来展示美食的平台',
				userInfo:{
					usericon:'/static/cat-8.png',
					username:'zcy',
					userid:'001'
				}
			}
=======
		data() {
			return {
				title: '食物app是一个用来展示美食的平台',
				userinfo: {
					name: 'mq',
					userid: '001'
				},
				usericon: ''
			}
		},
		onLoad() {

		},
		methods: {
			quit() {
				uni.clearStorage()

				uni.navigateTo({
					url: '../login/login'
				})
			}
		},
		onShow() {
			let userinfo = uni.getStorageSync('userinfo')
			this.userInfo = userinfo
			if (userinfo) {
				this.usericon = '/static/666.jpg'
			} else {
				this.usericon = ''
			}
>>>>>>> d747fee (作业13)
		}
		
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
<<<<<<< HEAD
	.headicon{
		width: 150px;
		height: 150px;
		border-radius: 50%;
		margin: 80rpx;
	}
	.entry-wrapper{
		width: 90%;
		margin-top: 50rpx;
		/* background-color: #888; */
	}
	.entry-wrapper .item{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		height: 80rpx;
		align-items: center;
		border-bottom: #C8C7CC solid 1rpx;
	}
	.entry-wrapper .item:first-child{
		border-top:  #C8C7CC solid 1rpx;
	}
	.entry-wrapper .item image{
		width: 48rpx;
		height: 48rpx;
	}
	button{
		width: 95%;
		margin-top: 50rpx;
=======

	.father {
		display: flex;
	}

	.headicon {
		width: 200rpx;
		height: 200rpx;
		margin-top: 80rpx;
		margin-bottom: 50rpx;
		margin-left: -200rpx;
		margin-right: 80rpx;
		border-radius: 50%;
	}

	.title {
		margin-top: 160rpx;
		font-size: 36rpx;
	}

	.entry-wrap {
		width: 90%;
		margin-top: 30rpx;
		margin-bottom: 30rpx;
	}

	.entry {
		height: 3em;
		line-height: 3em;
		text-align: left;
		border-bottom: #ccc solid 1px;
		position: relative;
	}


	.entry1 {
		width: 40rpx;
		height: 40rpx;
		background-size: contain;
		right: 0rpx;
		top: 0.5em;
	}

	.entry::after {
		content: '';
		width: 50rpx;
		height: 50rpx;
		background-image: url(../../static/more.png);
		background-size: contain;
		position: absolute;
		right: 0rpx;
		top: 0.5em;
	}

	.entry:first-child {
		border-top: #ccc solid 1px;
>>>>>>> d747fee (作业13)
	}
</style>